<template>
	<view class="form-item">
		<view class="form-item__label">{{ label }}</view>
		<view class="form-item__control">
			<slot />
		</view>
	</view>
</template>

<script lang="ts" setup>
	
	// 声明 Props
	defineProps<{
		label: string
	}>()
	
</script>

<style lang="scss">
.form-item {
	display: flex;
	align-items: center;
	padding: 0 20rpx;
	height: 100rpx;
	border-bottom: 1px solid #000;
	
	&__label {
		width: 200rpx;
	}
	
	&__control {
		flex: 1;
		overflow: hidden;
		text-align: right;
	}
}
</style>